<?php
if(isset($_REQUEST['agency_id'])){
	$v_agency_id=$_REQUEST['agency_id'];
}
if(_is_sqlserver()){
	// Lay so luong cau hoi co trong co quan hanh chinh
	$cmd = @mssql_init("Onegate_QAQuestionCountByAgency", $conn);
	@mssql_bind($cmd, "@p_agency_id",$v_agency_id, SQLINT4);
	$result = @mssql_execute($cmd);
	$arr_all_qa_by_agency = _get_row_to_array($result);
	@mssql_free_result($result);
	$v_total_qa =sizeof($arr_all_qa_by_agency);
	$v_agency_name = $arr_all_qa_by_agency['0']['1'];

	//Lay danh sach linh vuc
	$cmd = @mssql_init("ONEGATE_QACateGetAllByAgency",$conn);
	@mssql_bind($cmd,"@p_agency_id",$v_agency_id,SQLINT4);	
	$rs_all_cate = @mssql_execute($cmd);
	$arr_all_cate = _get_row_to_array($rs_all_cate); 
	@mssql_free_result($rs_all_cate);
}?>